<?php
/**
 * 轻云网络验证系统
 * =======================================================
 * 版权所有(C) 2019-2039 daenx.cn，并保留所有权利。
 * 作者：Daen大恩
 * 作者QQ: 1330166565
 * 开发群：661059773
 * =======================================================
 */
 
include 'data/config.php';

$get = $_GET[search];
$ycp = $_GET[ycp];

if($get){
	if($ycp==null){echo("<script language=\"javascript\" type=\"text/javascript\" src=\"/data/assets/js/jquery.min.js\"></script><script language=\"javascript\" type=\"text/javascript\" src=\"/data/assets/layer/layer.js\"></script><script>layer.open({  type: 1  ,title: false   ,closeBtn: false  ,area: '200px;'  ,shade: 0.8  ,id: 'LAY_layuipro'   ,resize: false  ,btn: ['确定']  ,moveType: 1   ,content: '<div style=\"padding: 30px; line-height: 22px; background-color: #393D49; color: #fff; font-weight: 300;\"><p style=\"text-align:left;\"><label>请选择要查询的产品</label><br /></p></div>'  ,success: function(layero){ var btn = layero.find('.layui-layer-btn');  btn.find('.layui-layer-btn0').attr({ href: 'index.php' });  }});</script>");die();}
	
	$SQL = "SELECT * FROM `authorize` WHERE `domain`='$get' and `ycp`='$ycp'";
	$query=mysqli_query($con,$SQL);
	while($row =mysqli_fetch_array($query)){
		$domain = $row[domain];
		$name = $row[username];
		$zt = $row[yumi];
		$bz = $row[bz];
		if($zt=="1")
		{$zt = "禁用中";}
		else
		{$zt = "正常";}
if($row['time']==null)
{$timegl = "永久";}
else
if($row['time']==free)
{$timegl = "免费用户";}
else
{$timegl = date("Y-m-d",$row['time']);}
											
	}
	
	if($get != $domain){
	echo("<script language=\"javascript\" type=\"text/javascript\" src=\"/data/assets/js/jquery.min.js\"></script><script language=\"javascript\" type=\"text/javascript\" src=\"/data/assets/layer/layer.js\"></script><script>layer.open({  type: 1  ,title: false   ,closeBtn: false  ,area: '200px;'  ,shade: 0.8  ,id: 'LAY_layuipro'   ,resize: false  ,btn: ['确定']  ,moveType: 1   ,content: '<div style=\"padding: 30px; line-height: 22px; background-color: #393D49; color: #fff; font-weight: 300;\"><p style=\"text-align:left;\"><label>查询账号：</label>".$get."<br /><label>查询产品：</label>".$ycp." &nbsp;&nbsp;<br /><label>查询结果：</label><font style=\"color:#EE4000;\">未授权</font></p></div>'  ,success: function(layero){ var btn = layero.find('.layui-layer-btn');  btn.find('.layui-layer-btn0').attr({ href: 'index.php' });  }});</script>");
	}
	else{

	echo("<script language=\"javascript\" type=\"text/javascript\" src=\"/data/assets/js/jquery.min.js\"></script><script language=\"javascript\" type=\"text/javascript\" src=\"/data/assets/layer/layer.js\"></script><script>layer.open({  type: 1  ,title: false   ,closeBtn: false  ,area: '200px;'  ,shade: 0.8  ,id: 'LAY_layuipro'   ,resize: false  ,btn: ['确定']  ,moveType: 1   ,content: '<div style=\"padding: 30px; line-height: 22px; background-color: #393D49; color: #fff; font-weight: 300;\"><p style=\"text-align:left;\"><label>查询账号：</label>".$domain."<br /><label>用户名：</label>".$name."<br /><label>状态：</label>".$zt."<br /><label>备注：</label>".$bz."<br /><label>查询产品：</label>".$ycp." &nbsp;&nbsp;<font style=\"color:#FFC125;\"><label>查询结果：</label><font style=\"color:#ADFF2F;\">正版授权</font> &nbsp;&nbsp;<font style=\"color:#FFC125;\"><label>到期时间：</label>".$timegl."</font></p></div>'  ,success: function(layero){ var btn = layero.find('.layui-layer-btn');  btn.find('.layui-layer-btn0').attr({ href: 'index.php' });  }});</script>");
	}
}

?>
